{% extends "opengoal/journal_base.html" %}
{% load form %}

{% block content %}
    {% if form.errors %}
        <p style="color: red;">
            Please correct the error{{ form.errors|pluralize }} below.
        </p>
    {% endif %}

    <form action="/journals/edit{{ journal.pk }}/" method="post"> {% csrf_token %}
        {{ form.non_field_errors }}
        <fieldset class="control-group">
            <table border="0" width="100%">
                {{ form|as_table }}
            </table>
            <hr style="color:#666666;border:outset;">
            {% if journal %}
                <button class="btn" type="submit"><i class="icon-ok"></i> Save changes</button>
            {% else %}
                <button class="btn" type="submit"><i class="icon-ok"></i> Create</button>
            {% endif %}
            or <a href="/journals/">cancel</a>
        </fieldset>
    </form>
{% endblock content %}